package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class DataDeleteRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/remove_diary";

    private String uuid;

    private long deleteTS;

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public long getDeleteTS() {
        return deleteTS;
    }

    public void setDeleteTS(long deleteTS) {
        this.deleteTS = deleteTS;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        DataDeleteRequestBody body = new DataDeleteRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setUuid(getUuid());
        body.setDeleteTS(getDeleteTS());
        return body;
    }

    private class DataDeleteRequestBody extends BaseTokenRequestBody {

        @SerializedName("DiaryID")
        private String uuid;

        @SerializedName("LastChangeTS")
        private long deleteTS;

        public DataDeleteRequestBody() {
            setSv(BaseRequestConfig.SV_DATA_DELETE);
        }

        public String getUuid() {
            return uuid;
        }

        public void setUuid(String uuid) {
            this.uuid = uuid;
        }

        public long getDeleteTS() {
            return deleteTS;
        }

        public void setDeleteTS(long deleteTS) {
            this.deleteTS = deleteTS;
        }
    }
}
